/*
 * FileResult.h
 *
 *  Created on: Jun 18, 2013
 *      Author: alexandru
 */

#include <iostream>
#include <vector>

#ifndef FILERESULT_H_
#define FILERESULT_H_

using namespace std;

class FileResult{
public:
	void addLine(string line);
	std::vector<string> getLines();
	string getStringContent();
	string getContent();
	string getContent(string separator);
	void printLines();

private:
	vector<string> allLines;
};

string FileResult::getContent(string separator){
	string res="";
	for(unsigned int i=0; i<allLines.size(); i++){
			res.append(allLines.at(i));
			res.append(separator);
		}
	return res;
}

string FileResult::getContent(){
	string res="";
	for(unsigned int i=0; i<allLines.size(); i++){
			res.append(allLines.at(i));
		}
	return res;
}

std::vector<string> FileResult::getLines(){
	return allLines;
}

void FileResult::printLines(){
	for(unsigned int i=0; i<allLines.size(); i++){
		cout << "line " << i << "  " << allLines.at(i) << endl;
	}
}

void FileResult::addLine(string line){
	allLines.push_back(line);
}

//final de obiect tip fileresult



#endif /* FILERESULT_H_ */
